<?php echo $this->getDropdownItems(); ?>    

<script>
    $(document).ready(function() {
        $('body').on('change', '.<?php echo $widgetID ?>', function() {
            var val = JSON.parse($(this).val());
            if ($(this).attr('parent') == 0) {
                $('#result-<?php echo $widgetID ?>').html('');
            }
            $(this).nextAll('select').remove();
            $.post('<?php echo Yii::app()->createUrl('/x8/page/getChilds'); ?>', {parentID: val.id, widgetID: '<?php echo $widgetID ?>'}, function(response) {
                $('#result-<?php echo $widgetID ?>').append(response);
                $('select').css("width", "100%").select2();
            });
            mobi03.url = val.url;
            if (typeof mobi03.url == undefined || mobi03.url === false)
                mobi03.url = '';
            $('#hidden-id').val(val.id);
        });
    });
</script>
<div id="result-<?php echo $widgetID ?>"></div>